/*
 * @Author: your name
 * @Date: 2022-01-21 11:35:32
 * @LastEditTime: 2022-01-21 16:38:18
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE{},
 * @FilePath: \eribbit-client-pc\src\store\index.js
 */
import { createStore } from 'vuex'

import createPersistedStore from 'vuex-persistedstate'

import cart from './modules/cart'
import user from './modules/user'
import category from './modules/category'

export default createStore({
  state: {
    username: 'zs'
  },
  getters: {

  },
  mutations: {
  },
  actions: {
  },
  modules: {
    cart,
    user,
    category
  },
  plugins: [
    createPersistedStore({
      key: 'erabbit-client-pc-store',
      paths: ['user', 'cart']

    })
  ]
})
